Sync phase 1: upstream v0.9.29 bugfixes onto chronode main - #5
Merged
Conversation
…0#1134) The rohitg00#625 fix removed the memory/ subdirectory and pointed the bridge at ~/.claude/projects/<slug>/MEMORY.md. Claude Code 2.x actually stores project memory at ~/.claude/projects/<slug>/memory/MEMORY.md (the index) plus per-topic .md files in the same memory/ dir — verified against the Claude Code 2.1.141 bundle (constants memory/MEMORY.md) and an existing project memory dir on disk. With the current path the bridge writes a MEMORY.md that Claude Code never reads, so CLAUDE_MEMORY_BRIDGE is silently broken on every platform. Restore the memory/ segment while keeping the leading-dash slug fix from rohitg00#625, and update the path tests accordingly. Co-authored-by: txtsamu <txtsamu@users.noreply.github.com>
…itg00#1132) * fix(memory): guard mem::forget delete/count on record existence Calling mem::forget with a lesson id (lsn_*) deleted a nonexistent key from the memories keyspace, counted it, and reported success. Guard the delete, index cleanup, and counter on the kv.get result, matching the mem::governance-delete pattern, so nonexistent ids return { success: true, deleted: 0 } with no audit row. Closes rohitg00#1120. * feat(lessons): add mem::lesson-delete soft-delete function Register mem::lesson-delete to set deleted: true on a lesson, mirroring the lesson-strengthen existence guard and audit pattern. Read paths already filter !l.deleted, and re-saving deleted content creates a fresh lesson. Adds lesson_delete to the audit operation union. * feat(mcp): expose memory_lesson_delete tool and REST endpoint Wire mem::lesson-delete through the MCP tool registry and dispatch case (memory_lesson_delete) and a POST /agentmemory/lessons/delete REST route with 400 for a missing lessonId and 404 for a nonexistent lesson. * chore(consistency): bump tool/endpoint counts to 54/129 Adds memory_lesson_delete to the registry, so update every count surface: tool-count test, README badge and prose, AGENTS.md stats, INSTALL_FOR_AGENTS.md, plugin manifests and docs, and the two code comments this change makes stale. REST endpoint count goes 128 to 129 for the new /agentmemory/lessons/delete route. * refactor(lessons): simplify 404 mapping and restore decay-delta test Cast the lesson-delete trigger result once instead of twice inline, and restore the lastDecayedAt incremental-delta decay test that was dropped when the lesson-delete describe block was added. * fix(review): align 404 error shape and regenerate skill references Review fixes: the lesson-delete REST route now returns the repo-standard { error: 'lesson not found' } body on 404 instead of the function-shaped { success: false } payload, matching api::memory-by-id. Regenerated the autogen MCP and REST skill references so memory_lesson_delete and the lessons/delete route appear in the tables with accurate counts. * fix(lessons): normalize lessonId at entry points and harden no-op test Address CodeRabbit review: trim lessonId once at both the MCP dispatch and REST route before triggering mem::lesson-delete (whitespace-padded ids previously 404'd or looked up raw), and extend the nonexistent- memoryId regression test to assert the no-op path performs no kv.delete and no search-index cleanup. --------- Co-authored-by: Rohit Ghumare <48523873+rohitg00@users.noreply.github.com>
Restore the memory_lesson_delete registry definition lost in conflict resolution, bump every count surface (test constant, README badge and prose, plugin manifests, AGENTS.md, autogen skill references, code comments) from the drifted 58/59 to the measured 60, and regenerate skill references so the generator output matches hand-resolved content.
Port of upstream rohitg00#908 fix (a2a2af9, subset): initialize echoes the client's requested revision when it is one we support and answers with the newest supported revision otherwise, so hosts requiring a newer MCP revision stop disconnecting with -32000. Strict tool discovery and the local fallback policy are unchanged; four handshake tests pin the wire behavior.
The cherry-picked REST registration bypassed registerApiTrigger, so the route shipped without middleware::api-auth and failed the every-route-protected invariant. Also refresh the generated interface inventory for the new route.
mcp-standalone.test.ts gained the initialize negotiation block; the tracked-tests list is unchanged, so only content_sha256 moves.
README prose, the banner-adjacent toolkit line, AGENTS.md stats, the boot banner in src/index.ts, and the generated interface inventory now agree with the registered route table.
The interface-inventory gate hardcoded pre-sync counts; align it with the regenerated inventory so CI matches the reconciled surfaces.
The committed hook bundles are build outputs; CI rebuilds them and the stale shim made the R13 runner see a dirty worktree. Rebuilt via npm run build after the protocolVersion change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of the staged v0.9.29 upstream sync (analysis: 17 upstream commits classified; this train takes the bugfixes the deployed 0.9.28-chronode.12 suffers from today).
Picked / ported:
memory/subdir in MEMORY.md path (fix(claude-bridge): restore memory/ subdir in MEMORY.md path rohitg00/agentmemory#1134)memory_forgetreporting + real lesson soft-delete path (fix(memory): honest memory_forget reporting + lesson delete path rohitg00/agentmemory#1132) — REST route re-wired throughregisterApiTriggerso it carriesmiddleware::api-authper fork invariant (test/api-crystal-scope.test.ts)initializeprotocolVersion negotiation (upstream Claude Code can't connect to agentmemory's mcp server anymore rohitg00/agentmemory#908 fix): echo whitelisted client revision, else newest supported — strict tool discovery unchanged; 4 handshake tests pin wire behaviorDeliberately skipped: a7114c7 (rewrites basename-resolver tests we replaced wholesale with canonical-resolver fixtures).
Count surfaces reconciled to measured reality after the new tool/route: MCP tools 58/59→60 across test constant, README (badge + prose), plugin manifests, AGENTS.md, autogen skill references (regenerated via
npm run skills:gen, no diff), code comments; REST endpoints 135→136 in README/AGENTS/boot banner/generated inventory. R13 test manifest content hash re-stamped for the negotiation tests.Test plan
npx vitest run: 1794 tests — all pass exceptcli-connect.test.ts > repairs hooks without --force…, which fails identically on unmodifiedmain@ 473a093 (pre-existing, tracked separately)tsc --noEmit -p tsconfig.json: zero new errors vs baseline (pre-existing transport.ts/tools-registry.ts schema-type errors unchanged)node scripts/r13/run.mjs --preflight-only: passes with mandatory + project-capability credentials configured